<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>购物车 - 在线商城</title>
    <style>
        .cart-container {
            padding: 20px;
            max-width: 1200px;
            margin: 0 auto;
        }
        .cart-header {
            display: flex;
            background-color: #f8f9fa;
            padding: 15px;
            font-weight: bold;
            border-bottom: 1px solid #dee2e6;
        }
        .cart-item {
            display: flex;
            padding: 15px;
            border-bottom: 1px solid #dee2e6;
            align-items: center;
        }
        .item-checkbox {
            width: 5%;
        }
        .item-info {
            width: 35%;
            display: flex;
            align-items: center;
        }
        .item-price {
            width: 20%;
        }
        .item-quantity {
            width: 20%;
        }
        .item-total {
            width: 15%;
        }
        .item-action {
            width: 5%;
        }
        .item-image {
            width: 80px;
            height: 80px;
            background-color: #f5f5f5;
            margin-right: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .quantity-control {
            display: flex;
            align-items: center;
        }
        .quantity-btn {
            width: 30px;
            height: 30px;
            background-color: #f8f9fa;
            border: 1px solid #dee2e6;
            cursor: pointer;
        }
        .quantity-input {
            width: 40px;
            height: 28px;
            text-align: center;
            border-top: 1px solid #dee2e6;
            border-bottom: 1px solid #dee2e6;
        }
        .cart-footer {
            display: flex;
            justify-content: space-between;
            padding: 20px;
            background-color: #f8f9fa;
            margin-top: 20px;
        }
        .total-price {
            font-size: 18px;
            font-weight: bold;
            color: #e74c3c;
        }
        .checkout-btn {
            background-color: #e74c3c;
            color: white;
            padding: 12px 30px;
            border: none;
            border-radius: 4px;
            font-size: 16px;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <%@ include file="../header.jsp" %>
    
    <div class="cart-container">
        <h1>我的购物车</h1>
        
        <div class="cart-header">
            <div class="item-checkbox">
                <input type="checkbox" id="selectAll">
            </div>
            <div class="item-info">商品信息</div>
            <div class="item-price">单价</div>
            <div class="item-quantity">数量</div>
            <div class="item-total">小计</div>
            <div class="item-action">操作</div>
        </div>
        
        <!-- 示例购物车项目 -->
        <div class="cart-item">
            <div class="item-checkbox">
                <input type="checkbox">
            </div>
            <div class="item-info">
                <div class="item-image">[图片]</div>
                <div>示例商品1</div>
            </div>
            <div class="item-price">¥99.00</div>
            <div class="item-quantity">
                <div class="quantity-control">
                    <button class="quantity-btn">-</button>
                    <input type="text" class="quantity-input" value="1">
                    <button class="quantity-btn">+</button>
                </div>
            </div>
            <div class="item-total">¥99.00</div>
            <div class="item-action">
                <button style="color: red; background: none; border: none; cursor: pointer;">删除</button>
            </div>
        </div>
        
        <div class="cart-item">
            <div class="item-checkbox">
                <input type="checkbox">
            </div>
            <div class="item-info">
                <div class="item-image">[图片]</div>
                <div>示例商品2</div>
            </div>
            <div class="item-price">¥199.00</div>
            <div class="item-quantity">
                <div class="quantity-control">
                    <button class="quantity-btn">-</button>
                    <input type="text" class="quantity-input" value="2">
                    <button class="quantity-btn">+</button>
                </div>
            </div>
            <div class="item-total">¥398.00</div>
            <div class="item-action">
                <button style="color: red; background: none; border: none; cursor: pointer;">删除</button>
            </div>
        </div>
        
        <div class="cart-footer">
            <div>
                <input type="checkbox" id="selectAllBottom">
                <label for="selectAllBottom">全选</label>
            </div>
            <div>
                <span>总计：</span>
                <span class="total-price">¥497.00</span>
                <button class="checkout-btn" onclick="checkout()">去结算</button>
            </div>
        </div>
    </div>
    
    <script>
        function checkout() {
            alert('正在前往结算页面');
        }
    </script>
</body>
</html>